package Deom2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-11-16
 * Time: 21:55
 */
public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();
        //打开电脑
        computer.powerOn();
        //使用鼠标
        computer.useDevice(new Mouse());
        //使用键盘
        computer.useDevice(new KeyBoard());
        //关闭电脑
        computer.powerOff();
    }
}
